<template>
    <div>
      <a-table
        :columns="columns"
        :dataSource="data"
        bordered
        rowKey="id"
        pagination="false"
      >
        <template #footer>
          <div style="text-align: center; font-weight: bold; color: red;">
            今日销售发货托数合计：<span>{{ totalShipments }}</span>
          </div>
        </template>
      </a-table>
    </div>
  </template>
  
  <script>
  import { defineComponent } from "vue";
  
  export default defineComponent({
    data() {
      return {
        columns: [
          { title: "开单时间", dataIndex: "billingTime", key: "billingTime" },
          { title: "客户名称", dataIndex: "customerName", key: "customerName" },
          { title: "单号", dataIndex: "orderNumber", key: "orderNumber" },
          { title: "料号", dataIndex: "materialCode", key: "materialCode" },
          { title: "名称", dataIndex: "name", key: "name" },
          { title: "数量", dataIndex: "quantity", key: "quantity" },
          { title: "应发（托）", dataIndex: "shouldShip", key: "shouldShip" },
          { title: "实发（托）", dataIndex: "actualShip", key: "actualShip" },
          { title: "发货情况", dataIndex: "status", key: "status" },
          { title: "差异", dataIndex: "difference", key: "difference" },
          { title: "备注（原因）", dataIndex: "remarks", key: "remarks" },
          { title: "发货时间", dataIndex: "shipmentTime", key: "shipmentTime" },
          { title: "司机", dataIndex: "driver", key: "driver" },
          { title: "车辆", dataIndex: "vehicle", key: "vehicle" },
        ],
        data: [
          {
            id: 1,
            billingTime: "2025/1/2 15:19",
            customerName: "深圳理光",
            orderNumber: "80525898",
            materialCode: "220005000581",
            name: "Cell电池模组7.0",
            quantity: 600,
            shouldShip: 38,
            actualShip: 38,
            status: "已发",
            difference: 0,
            remarks: "",
            shipmentTime: "2025/1/4 19:00",
            driver: "胡超",
            vehicle: "渝DY1202",
          },
          // 继续添加数据
        ],
        totalShipments: 112, // 总托数
      };
    },
  });
  </script>
  
  <style>
  /* 可根据需要自定义表格样式 */
  </style>
  